export enum DIMENSION {
  '默认维度' = 'sd',
  '切换维度' = 'ds',
}

export const FIRELOW = 394.9;

export const PROVINCES = {
  shanxi: '山西省',
  shandong: '山东省',
  gansu: '甘肃省',
};

export const TYPE_OPTIONS = [
  { label: '全部', value: 0 },
  { label: '风电', value: 3 },
  { label: '光伏', value: 4 },
];

export const SORT = {
  desc: 'desc',
  asc: 'asc',
};

export const indexMap: any = {
  totalStatementEnergyQuantity: {
    name: '综合电量',
    type: 'bar',
    color: '#5795CD',
  },
  totalStatementEnergyPrice: {
    name: '综合电价',
    type: 'line',
    color: '#E6E963',
    props: {
      symbol: 'circle',
    },
  },

  longProvincialSpotQuantity: {
    name: '省间现货电量',
    type: 'bar',
    color: '#2174FF',
    props: { stack: 'one' },
  },
  longContractQuantity: {
    name: '中长期合约电量',
    type: 'bar',
    color: '#3CB1FB',
    props: { stack: 'one' },
  },

  longWineSteelOpenContract: {
    name: '酒钢开口合同',
    type: 'bar',
    color: '#075288',
    props: { stack: 'one' },
  },
  dayaheadSpotFrontQuantity: {
    name: '日前现货正电量',
    type: 'bar',
    color: '#07A872',
    props: { stack: 'one' },
  },
  dayaheadSpotBurdenQuantity: {
    name: '日前现货负电量',
    type: 'bar',
    color: '#575FA1',
    props: { stack: 'one' },
  },
  dayaheadSpotDeviationQuantity: {
    name: '日前偏差电量',
    type: 'bar',
    color: '#D29E08',
    props: { stack: 'one' },
  },
  realtimeSpotFrontQuantity: {
    name: '实时现货正电量',
    type: 'bar',
    color: '#ED8139',
    props: { stack: 'one' },
  },
  realtimeSpotBurdenQuantity: {
    name: '实时现货负电量',
    type: 'bar',
    color: '#FB6E77',
    props: { stack: 'one' },
  },
  realtimeSpotDeviationQuantity: {
    name: '实时偏差电量',
    type: 'bar',
    color: '#FF70CF',
    props: { stack: 'one' },
  },
  closeSpotRealityQuantity: {
    name: '实时结算电量',
    type: 'bar',
    color: '#B382F0',
    props: { stack: 'one' },
  },
  closeSpotDeviationQuantity: {
    name: '现货偏差电量',
    type: 'bar',
    color: '#575FA1',
    props: { stack: 'one' },
  },

  longPrice: {
    name: '中长期均价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#5795CD',
  },
  closeSpotFrontDeviationPrice: {
    name: '现货正偏差电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#2BDAE5',
  },
  closeSpotBurdenDeviationPrice: {
    name: '现货负偏差电价',
    type: 'line',
    props: { symbol: 'circle' },
    color: '#E6E963',
  },
};
/**
 * 前下划线 _averagePrice        表示计算
 * 中下划线 averageFeedinPrice_2 表示同名但不同系列
 */
export const chartsMap = {
  场站总览: ['totalStatementEnergyQuantity', 'totalStatementEnergyPrice'],
  电量分析: [
    'longProvincialSpotQuantity',
    'longContractQuantity',
    'longWineSteelOpenContract',
    'dayaheadSpotFrontQuantity',
    'dayaheadSpotBurdenQuantity',
    'dayaheadSpotDeviationQuantity',
    'realtimeSpotFrontQuantity',
    'realtimeSpotBurdenQuantity',
    'realtimeSpotDeviationQuantity',
    'closeSpotRealityQuantity',
    'closeSpotDeviationQuantity',
  ],
  电价分析: ['longPrice', 'closeSpotFrontDeviationPrice', 'closeSpotBurdenDeviationPrice'],
};

//需要展示双Y轴的图表
export const Doubel_yAxis_title = ['场站总览'];

//需要展示双Y轴的serise字段
export const Doubel_yAxis_serise = ['totalStatementEnergyPrice'];

export const SELECT_DATA: string[] = ['交易单元', '日期', '时点'];
export const tableHead = [
  {
    field: 'totalStatementEnergyIncome',
    name: '现货结算电费',
    parentName: '综合结算',
  },
  {
    field: 'totalStatementEnergyQuantity',
    name: '现货结算电量',
    parentName: '综合结算',
  },
  {
    field: 'totalStatementEnergyPrice',
    name: '综合结算均价',
    parentName: '综合结算',
  },
  {
    field: 'longProvincialSpotQuantity',
    name: '省间现货电量',
    parentName: '中长期',
  },
  {
    field: 'longContractQuantity',
    name: '中长期合约电量',
    parentName: '中长期',
  },
  {
    field: 'longWineSteelOpenContract',
    name: '酒钢开口合同',
    parentName: '中长期',
  },
  {
    field: 'longPrice',
    name: '中长期均价',
    parentName: '中长期',
  },
  {
    field: 'longIncome',
    name: '中长期电费',
    parentName: '中长期',
  },
  {
    field: 'dayaheadSpotFrontQuantity',
    name: '日前现货正电量',
    parentName: '日前现货市场',
  },
  {
    field: 'dayaheadSpotFrontIncome',
    name: '日前现货正电费',
    parentName: '日前现货市场',
  },
  {
    field: 'dayaheadSpotBurdenQuantity',
    name: '日前现货负电量',
    parentName: '日前现货市场',
  },
  {
    field: 'dayaheadSpotBurdenIncome',
    name: '日前现货负电费',
    parentName: '日前现货市场',
  },
  {
    field: 'dayaheadSpotDeviationQuantity',
    name: '日前偏差电量',
    parentName: '日前现货市场',
  },
  {
    field: 'dayaheadSpotDeviationIncome',
    name: '日前偏差电费',
    parentName: '日前现货市场',
  },
  {
    field: 'realtimeSpotFrontQuantity',
    name: '实时现货正电量',
    parentName: '实时现货市场',
  },
  {
    field: 'realtimeSpotFrontIncome',
    name: '实时现货正电费',
    parentName: '实时现货市场',
  },
  {
    field: 'realtimeSpotBurdenQuantity',
    name: '实时现货负电量',
    parentName: '实时现货市场',
  },
  {
    field: 'realtimeSpotBurdenIncome',
    name: '实时现货负电费',
    parentName: '实时现货市场',
  },
  {
    field: 'realtimeSpotDeviationQuantity',
    name: '实时偏差电量',
    parentName: '实时现货市场',
  },
  {
    field: 'realtimeSpotDeviationIncome',
    name: '实时偏差电费',
    parentName: '实时现货市场',
  },
  {
    field: 'closeSpotRealityQuantity',
    name: '实际结算电量',
    parentName: '合计现货结算',
  },
  {
    field: 'closeSpotDeviationQuantity',
    name: '现货偏差电量',
    parentName: '合计现货结算',
  },
  {
    field: 'closeSpotDeviationIncome',
    name: '现货偏差电费',
    parentName: '合计现货结算',
  },
  {
    field: 'closeSpotFrontDeviationPrice',
    name: '现货正偏差电价',
    parentName: '合计现货结算',
  },
  {
    field: 'closeSpotBurdenDeviationPrice',
    name: '现货负偏差电价',
    parentName: '合计现货结算',
  },
  {
    field: 'examineQuantity',
    name: '考核电量',
  },
  {
    field: 'deviationExamineIncome',
    name: '偏差考核费用',
  },
  {
    field: 'accidentFiringCompensate',
    name: '事故调用启动补偿',
  },
  {
    field: 'accidentRunCompensate',
    name: '事故调用运行补偿',
  },
  {
    field: 'transferIncreaseEnergyCompensation',
    name: '调频增发能量补偿',
  },
  {
    field: 'transferReduceEnergyCompensation',
    name: '调频减发能量补偿',
  },
  {
    field: 'unplannedStopDeviation',
    name: '非计划停运考核',
  },
];

/**
 * {key:value}
 */
export const headerMap = tableHead.reduce((a: any, b) => {
  a[b.name] = b.field;
  return a;
}, {});

export const OPTION_KEY: Record<string, any> = {
  交易单元: 'stationName',
  日期: 'date',
  时点: 'timeOrder',
};
